import http from '../utils/http.js'
const goods = {
	getClassify() {
		return http.get(`/goodsClassify`);
	},
	findAllName() {
		return http.get(`/goods/findAllName`);
	},
	findById(id) {
		return http.get(`/goods/${id}`);
	},
	find({name, sortStr, classify}) {
		return http.get(`/goods?name=${name}${sortStr}&classify=${classify}`);
	},
	create(data) {
		return http.post(`/goods`, data);
	}
}

export default goods;
